import { ApiProperty } from '@nestjs/swagger';
import {
  Length,
  IsString,
  IsNotEmpty,
  IsOptional,
  IsNumber,
} from 'class-validator';

export class UpdateTeacherDto {
  @ApiProperty({ example: '张三', description: '姓名' })
  @IsString()
  @IsNotEmpty({ groups: ['create'], message: '姓名必须填写' })
  t_name: string;

  @ApiProperty({ example: 0, description: '性别' })
  @IsNumber()
  gender: number;

  @ApiProperty({ example: 0, description: '联系方式' })
  @IsOptional()
  t_tel: number;
}
